<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Tekdaqc Firmware: Digital_Input.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customstyle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Tekdaqc Firmware
   &#160;<span id="projectnumber">1.0.2.0</span>
   </div>
   <div id="projectbrief">The firmware of the Tekdaqc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_digital___input_8c.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Digital_Input.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Source file for the <a class="el" href="struct_digital___input__t.html" title="Data structure used to store the state and requirements of a digital input to the Tekdaqc...">Digital_Input_t</a> data structure.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="_tekdaqc___debug_8h_source.html">Tekdaqc_Debug.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_digital___input_8h_source.html">Digital_Input.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_tekdaqc___b_s_p_8h_source.html">Tekdaqc_BSP.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_tekdaqc___command_interpreter_8h_source.html">Tekdaqc_CommandInterpreter.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_tekdaqc___timers_8h_source.html">Tekdaqc_Timers.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="boolean_8h_source.html">boolean.h</a>&quot;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
</div>
<p><a href="_digital___input_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a79e35a57d50639541672dcfbe9193e43"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_digital___input_8c.html#a79e35a57d50639541672dcfbe9193e43">DIGITAL_INPUT_FORMATTER</a>&#160;&#160;&#160;&quot;\n\r--------------------\n\rDigital Input\n\r\tName: %s\n\r\tPhysical Channel: %i\n\r\tTimestamp: %&quot; PRIu64 &quot;\n\r\tLevel: %s\n\r--------------------\n\r\x1E&quot;</td></tr>
<tr class="memdesc:a79e35a57d50639541672dcfbe9193e43"><td class="mdescLeft">&#160;</td><td class="mdescRight">The message format string for printing a digital input to a human readable string.  <a href="#a79e35a57d50639541672dcfbe9193e43">More...</a><br/></td></tr>
<tr class="separator:a79e35a57d50639541672dcfbe9193e43"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gacf4e27adc3b6643e12e01e4d1000db63"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#gacf4e27adc3b6643e12e01e4d1000db63">DigitalInputsInit</a> (void)</td></tr>
<tr class="memdesc:gacf4e27adc3b6643e12e01e4d1000db63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the boards digital input data structures.  <a href="group__digital__input.html#gacf4e27adc3b6643e12e01e4d1000db63">More...</a><br/></td></tr>
<tr class="separator:gacf4e27adc3b6643e12e01e4d1000db63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf5dbc88e9aa5cee34b35d908a2e61276"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__tekdaqc__error.html#ga19df05d919ecca7a7501b35ae9080a32">Tekdaqc_Function_Error_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#gaf5dbc88e9aa5cee34b35d908a2e61276">ListDigitalInputs</a> (void)</td></tr>
<tr class="memdesc:gaf5dbc88e9aa5cee34b35d908a2e61276"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints a representation of all the added digital inputs.  <a href="group__digital__input.html#gaf5dbc88e9aa5cee34b35d908a2e61276">More...</a><br/></td></tr>
<tr class="separator:gaf5dbc88e9aa5cee34b35d908a2e61276"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5b4bb29221f6aafe926340eafcf7f722"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__tekdaqc__error.html#ga19df05d919ecca7a7501b35ae9080a32">Tekdaqc_Function_Error_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#ga5b4bb29221f6aafe926340eafcf7f722">CreateDigitalInput</a> (char keys[][<a class="el" href="group__command__parser.html#ga6147771b5547853f33eb838895e3d5a2">MAX_COMMANDPART_LENGTH</a>], char values[][<a class="el" href="group__command__parser.html#ga6147771b5547853f33eb838895e3d5a2">MAX_COMMANDPART_LENGTH</a>], int count)</td></tr>
<tr class="memdesc:ga5b4bb29221f6aafe926340eafcf7f722"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures a digital input with the specified parameters.  <a href="group__digital__input.html#ga5b4bb29221f6aafe926340eafcf7f722">More...</a><br/></td></tr>
<tr class="separator:ga5b4bb29221f6aafe926340eafcf7f722"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga654bd56de221fbfe0426cb0a18917beb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__tekdaqc__error.html#ga19df05d919ecca7a7501b35ae9080a32">Tekdaqc_Function_Error_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#ga654bd56de221fbfe0426cb0a18917beb">AddDigitalInput</a> (<a class="el" href="struct_digital___input__t.html">Digital_Input_t</a> *input)</td></tr>
<tr class="memdesc:ga654bd56de221fbfe0426cb0a18917beb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a digital input, marking it for inclusion in the state machine.  <a href="group__digital__input.html#ga654bd56de221fbfe0426cb0a18917beb">More...</a><br/></td></tr>
<tr class="separator:ga654bd56de221fbfe0426cb0a18917beb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3b0d15fea40d84eaf677d216e1530d89"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__tekdaqc__error.html#ga19df05d919ecca7a7501b35ae9080a32">Tekdaqc_Function_Error_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#ga3b0d15fea40d84eaf677d216e1530d89">RemoveDigitalInput</a> (char keys[][<a class="el" href="group__command__parser.html#ga6147771b5547853f33eb838895e3d5a2">MAX_COMMANDPART_LENGTH</a>], char values[][<a class="el" href="group__command__parser.html#ga6147771b5547853f33eb838895e3d5a2">MAX_COMMANDPART_LENGTH</a>], int count)</td></tr>
<tr class="memdesc:ga3b0d15fea40d84eaf677d216e1530d89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes a digital input, marking it for exclusion from the state machine.  <a href="group__digital__input.html#ga3b0d15fea40d84eaf677d216e1530d89">More...</a><br/></td></tr>
<tr class="separator:ga3b0d15fea40d84eaf677d216e1530d89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadfa62573aaa64c6bdcbb94c164099154"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_digital___input__t.html">Digital_Input_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#gadfa62573aaa64c6bdcbb94c164099154">GetDigitalInputByNumber</a> (uint8_t number)</td></tr>
<tr class="memdesc:gadfa62573aaa64c6bdcbb94c164099154"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the requested digital input.  <a href="group__digital__input.html#gadfa62573aaa64c6bdcbb94c164099154">More...</a><br/></td></tr>
<tr class="separator:gadfa62573aaa64c6bdcbb94c164099154"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8c060a2a592e2644ffe8efdb198637f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#ga8c060a2a592e2644ffe8efdb198637f2">SampleDigitalInput</a> (<a class="el" href="struct_digital___input__t.html">Digital_Input_t</a> *input)</td></tr>
<tr class="memdesc:ga8c060a2a592e2644ffe8efdb198637f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Samples the specified digital input's level and writes out the result.  <a href="group__digital__input.html#ga8c060a2a592e2644ffe8efdb198637f2">More...</a><br/></td></tr>
<tr class="separator:ga8c060a2a592e2644ffe8efdb198637f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaa11463a9a8f8ae76ebd26ca8331e734"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#gaaa11463a9a8f8ae76ebd26ca8331e734">SampleAllDigitalInputs</a> (void)</td></tr>
<tr class="memdesc:gaaa11463a9a8f8ae76ebd26ca8331e734"><td class="mdescLeft">&#160;</td><td class="mdescRight">Samples the digital input level of all added digital inputs, writing out the results.  <a href="group__digital__input.html#gaaa11463a9a8f8ae76ebd26ca8331e734">More...</a><br/></td></tr>
<tr class="separator:gaaa11463a9a8f8ae76ebd26ca8331e734"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga77861794e1f3432e96903fee5fe1bc2b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#ga77861794e1f3432e96903fee5fe1bc2b">SetDigitalInputWriteFunction</a> (<a class="el" href="group__tekdaqc__configuration.html#ga163b2a4cc55a569e988df48908631967">WriteFunction</a> writeFunction)</td></tr>
<tr class="memdesc:ga77861794e1f3432e96903fee5fe1bc2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the pointer to the function to invoke when digital input data needs to be written.  <a href="group__digital__input.html#ga77861794e1f3432e96903fee5fe1bc2b">More...</a><br/></td></tr>
<tr class="separator:ga77861794e1f3432e96903fee5fe1bc2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga007c56810797c98a6c03ac2836ad9328"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#ga007c56810797c98a6c03ac2836ad9328">WriteDigitalInput</a> (<a class="el" href="struct_digital___input__t.html">Digital_Input_t</a> *input)</td></tr>
<tr class="memdesc:ga007c56810797c98a6c03ac2836ad9328"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes out the data for the specified digital input.  <a href="group__digital__input.html#ga007c56810797c98a6c03ac2836ad9328">More...</a><br/></td></tr>
<tr class="separator:ga007c56810797c98a6c03ac2836ad9328"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaffb0acdfc01e77cc785bda2fbbe1c367"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__digital__input.html#gaffb0acdfc01e77cc785bda2fbbe1c367">WriteAllDigitalInputs</a> (void)</td></tr>
<tr class="memdesc:gaffb0acdfc01e77cc785bda2fbbe1c367"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes out the data for all added digital inputs.  <a href="group__digital__input.html#gaffb0acdfc01e77cc785bda2fbbe1c367">More...</a><br/></td></tr>
<tr class="separator:gaffb0acdfc01e77cc785bda2fbbe1c367"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Contains methods for manipulating and interfacing to the Digital_Input)t data structure.</p>
<dl class="section author"><dt>Author</dt><dd>Jared Woolston (<a href="#" onclick="location.href='mai'+'lto:'+'jwo'+'ol'+'sto'+'n@'+'ten'+'ki'+'v.c'+'om'; return false;">jwool<span style="display: none;">.nosp@m.</span>ston<span style="display: none;">.nosp@m.</span>@tenk<span style="display: none;">.nosp@m.</span>iv.c<span style="display: none;">.nosp@m.</span>om</a>) </dd></dl>

<p>Definition in file <a class="el" href="_digital___input_8c_source.html">Digital_Input.c</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a79e35a57d50639541672dcfbe9193e43"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DIGITAL_INPUT_FORMATTER&#160;&#160;&#160;&quot;\n\r--------------------\n\rDigital Input\n\r\tName: %s\n\r\tPhysical Channel: %i\n\r\tTimestamp: %&quot; PRIu64 &quot;\n\r\tLevel: %s\n\r--------------------\n\r\x1E&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="_digital___input_8c_source.html#l00050">50</a> of file <a class="el" href="_digital___input_8c_source.html">Digital_Input.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_2ee1bcc70ffbdd9fa2e6058af4d56b44.html">TekDAQC_Firmware</a></li><li class="navelem"><a class="el" href="dir_487e5c767aeaee42821fd912e2f2cba6.html">src</a></li><li class="navelem"><a class="el" href="_digital___input_8c.html">Digital_Input.c</a></li>
    <li class="footer">Generated on Mon Jul 28 2014 23:42:40 for Tekdaqc Firmware by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
